CycleItem

Section: ET++ class description (n)
Updated: automatically Thu Mar 21 20:11:04 1991
Index Return to Main Contents
 

NAME

CycleItem - cycles through several VObjects  

DESCRIPTION

The CycleItem cycles through a list of VObjects maintaining a current item. Only that item is drawn and gets events. Any kind of VObject can be put into a CycleItem, even more complex items such as a Scroller or a Cluster.
The CycleItem itself should be put into an EnumItem because it reacts only on the EnumItem's up and down events. In addition, clients can actively set the current item with the method SetCurrentItem.
Example:
VObject *layout =
        new EnumItem(cIdNone, eVObjVTop,
                new CycleItem(cIdNone, eVObjVBase,
                        new LabeledButton(cIdButton1, "on/off", FALSE),
                        new Scroller(new TextView(/* ... */)),
                        new OneOfCluster(cIdRadioBox, eVObjHLeft, gPoint8,
                                new LabeledButton(cIdBox1, "1"),
                                new LabeledButton(cIdBox2, "2"),
                                new LabeledButton(cIdBox3, "3"),
                                NULL
                        ),
                        NULL
                )
        );


classes are never derived from CycleItem.
class CycleItem is sometimes reused directly.
class CycleItem contains 14 methods.

owner of class:
nobody.
baseclasses:
CompositeVObject
flags:
CompositeVObjectFlags

 

INSTANCE VARIABLES

align (protected VObjAlign)
specifies how to align the current item within the content rectangle of the CycleItem. See also enum VObjAlign.

current (protected int)
the index of the current item. Only that item is drawn and gets events. current can be accessed with the method GetCurrentItem and the method SetCurrentItem.

mode (protected bool)
mode affects layout calculation.
If mode is TRUE, then each up and down cycle event triggers the recalculation of the overall dialog layout in order to adjust the size of the CycleItem to the size of the current item.
If mode is FALSE, then the calculation is done only once, but the CycleItem will always have the size of its biggest item.
Consider that setting the mode to TRUE will slow down execution speed.
Known Problems: Clients actually cannot set the mode because there is neither an access method nor a constructor argument. Only subclasses can set it.

 

INSTANCE METHOD LIST

client interface
CycleItem
GetCurrentItem
SetCurrentItem

implementation
DispatchEvents
Draw
GetMinSize
Init
PrintOn
ReadFrom
SendDown
SetExtent
SetOrigin

 

CATEGORIES

VObject Composition

 

FILES

declaration:
CycleItem.h

 

HISTORY

joe@csesbg.at  Thu Sep 12 13:04 1991 MET DST

man2html: unable to open or read file ../mann/CycleItem::CycleItem.n
man2html: unable to open or read file ../mann/CycleItem::DispatchEvents.n
man2html: unable to open or read file ../mann/CycleItem::Draw.n
man2html: unable to open or read file ../mann/CycleItem::GetCurrentItem.n
man2html: unable to open or read file ../mann/CycleItem::GetMinSize.n
man2html: unable to open or read file ../mann/CycleItem::Init.n
man2html: unable to open or read file ../mann/CycleItem::PrintOn.n
man2html: unable to open or read file ../mann/CycleItem::ReadFrom.n
man2html: unable to open or read file ../mann/CycleItem::SendDown.n
man2html: unable to open or read file ../mann/CycleItem::SetCurrentItem.n
man2html: unable to open or read file ../mann/CycleItem::SetExtent.n
man2html: unable to open or read file ../mann/CycleItem::SetOrigin.n


 

Index

NAME
DESCRIPTION
INSTANCE VARIABLES
INSTANCE METHOD LIST
CATEGORIES
FILES
HISTORY

This document was created by man2html, using the manual pages.
Time: 00:40:29 GMT, March 30, 2022